package class202204._21_25;

public class MyDate {
    public int year;
    public int month;
    public int day;

    /**
     * 设置日期
     */
    public void setDate(int year,int month,int day){
        this.year = year;
        this.month = month;
        this.day = day;
    }

    public void  printDate(){
        System.out.println(this.year+"年"+this.month+"月"+this.day+"日");
    }







    public static void main1(String[] args) {
        MyDate myDate = new MyDate();
        myDate.setDate(2022,3,15);
        myDate.printDate();

        MyDate myDate2 = new MyDate();
        myDate.setDate(2022,3,28);
        myDate.printDate();
    }
}
